<!DOCTYPE html>
<html>
	<head>
		<meta charset="utf-8">
		<link rel="stylesheet" href="{{__PUBLIC__}}/Home/css/myorder.css" />
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/common_header.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/common_bottom.css"/>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/css/animate.min.css"/>
	    <link rel="shortcut icon" href="{{__PUBLIC__}}/Admin/Flat/img/favicon.ico">
		<script type="text/javascript" src="{{__PUBLIC__}}/jquery-1.7.2.min.js"></script>
		<link rel="stylesheet" type="text/css" href="{{__PUBLIC__}}/Home/hdjs/hdjs.css"/>
		<script type="text/javascript" src="{{__PUBLIC__}}/Home/hdjs/hdjs.min.js"></script>
		<title></title>
	</head>
	<body>
		<!--引入公共头部-->
	{{include file="VIEW_PATH/Common/header.php"}}
	<!--logo下面的导航-->
	<?php 
//	实例化
	$cateModel = new \Home\Common\Model\Category;
//	调用模型里面的方法，得到数组
	$cateData = $cateModel->getCate();
	 ?>
	<div class="navigation_long">
		<div class="navigation">
			<div class="navigation_l">
				<p>全部商品<i></i></p>
				<!--二级菜单-->
				<ul class="category_box_l">
					{{foreach from="$cateData" value="$second_v"}}
			<li class="category_item">
				<div class="category-info">
					<a href="{{U('Lists/index',array('cid'=>$second_v['cid']))}}" class="category_title">{{$second_v['cname']}}</a>
					{{foreach from="$second_v['threeSon']" value="$threeSon_v"}}
					<a href="{{U('Lists/index',array('cid'=>$threeSon_v['cid']))}}" class="category_second">{{$threeSon_v['cname']}}</a>
					{{endforeach}}
				</div>
				<!--移入li右侧div-->
				<div class="category-panels">
					<ul class="subcate-list">
						{{foreach from="$second_v['son']" value="$son_v"}}
						<li class="subcate-item">
							<a href="/list-75" target="_blank">
								<span>{{$son_v['cname']}}</span>
							</a>
						</li>
						{{endforeach}}
					</ul>
				</div>
			</li>
			{{endforeach}}
		</ul>
		<!--二级菜单结束-->
			</div>
		<!--右侧-->
		<ul class="navigation_r">
			<li style="background: #BA181F;" class="navigation_r_hover">
				<a href="index.php">首页</a>
			</li>
			{{foreach from="$cateData" value="$nav_v"}}
			<li class="navigation_r_hover">
				<a href="{{U('Lists/index',array('cid'=>$nav_v['cid']))}}" >{{$nav_v['cname']}}</a>
			</li>
			{{endforeach}}
		</ul>	
		</div>
	</div>
	<!--logo下面的导航结束-->
		<!--顶部导航部分-->
		<div class="category">
			<a href="">首页</a>&nbsp;
			<!-- <a href="">我的商城</a> -->
			&nbsp;&nbsp;\&nbsp;&nbsp;我的订单
		</div>
		<!--顶部导航部分结束-->
		<div class="main">
			<div class="left">
				<a class='title'>我的商城<a>
				<h3 class='order_center'>
					<span>订单中心</span>
				</h3>
				<ul class='order_list'>
					<li class='cur'><a href="">我的订单</a><em>{{$ordernum}}</em></li>
				</ul>
				<h3 class='order_center'>
					<span>个人中心</span>
				</h3>
				<ul class='order_list'>
					<li><a href="{{U('address')}}">收货地址管理</a></li>
					<!--<li><a href="{{U('users')}}">个人资料</a></li>-->
				</ul>
			</div>
			<!--右边部分-->
			<div class="right">
				<div class="chongzhi">
					<h1>{{$_SESSION['username']}},欢迎您回来！</h1>
					<h1>账户余额: <span class="yue">{{$yue}}.00</span>元</h1>
					<!--*******弹窗 充值窗口-->
					<div style="visibility: hidden; width: 1348px; height: 2459px; z-index: 417;" class="ol_box_mask"></div>
					<!--rotateOut-->
					<div class="box animated">
						<form action="" method="post" id="yue_form">
							<label for="yue" style="font-size: 25px;">随便充！</label>
							<input type="text" name="balance" id="yue" value="" />
							<input type="hidden" name="uid" value="{{$_SESSION['app_uid']}}"/>
							<input type="submit" value="充&nbsp;值"  class="btn btn-block btn-lg btn-primary" id="box_chongzhi"/>
							<a href="#fakelink" class="btn btn-block btn-lg btn-danger" id="box_close">关闭</a>
							<span id="hd_balance"></span>
						</form>
					</div>
					<!--充值按钮-->
					<a href="javascript:;" class="btn btn-block btn-lg btn-primary" style="float: right;">充值</a>
					<script type="text/javascript">
						$(function(){
							$('.btn-primary').click(function(){
								$('.ol_box_mask').css({'visibility':'visible'});
								$('.box').addClass('rotateIn').removeClass('rotateOut');
								$('.box').show();
							})
							$('#box_close').click(function(){
								$('.ol_box_mask').css({'visibility':'hidden'});
								$('.box').addClass('rotateOut').removeClass('rotateIn');
//								$('.box').hide();
							})
							$('#yue_form').validate({
								balance:{
									rule:{
										required:true,
										regexp:/^[0-9]*(\.[0-9]{1,2})?$/
									},
									error:{
										required:'必须填写金额',
										regexp:'金额格式不正确o'
									},
									success:'正确'
								}
							})
						})
					</script>
				</div>
				<!--*********充值窗口 结束-->
				<h2 class='title'>我的订单</h2>
				<ul class='ord_list'>
					<li><a href="{{U('index')}}" {{if value="$status eq 0"}} class='cur'{{endif}}>全部</a></li>
					<li><a href="{{U('index',array('n'=>1))}}"  {{if value="$status eq 1"}} class='cur'{{endif}}>待支付</a><span class="beautifull"></span></li>
					<li><a href="{{U('index',array('n'=>2))}}" {{if value="$status eq 2"}} class='cur'{{endif}}>已完成</a><span class="beautifull"></span></li>
					<li><a href="{{U('index',array('n'=>3))}}" {{if value="$status eq 3"}} class='cur'{{endif}}>待发货</a><span class="beautifull"></span></li>
					<li><a href="{{U('index',array('n'=>4))}}" {{if value="$status eq 4"}} class='cur'{{endif}}>待收货</a><span class="beautifull"></span></li>
					<li><a href="{{U('index',array('n'=>5))}}" {{if value="$status eq 5"}} class='cur'{{endif}}>已取消</a><span class="beautifull"></span></li>
					<!--<li><a href="">已完成</a><span class="beautifull"></span></li>-->
				</ul>
				<style type="text/css">
					.beautifull{
						color: red;
					}
				</style>
				<!--<div class="quanxuan">
				 <input type="checkbox" name="checked" id="" /> <span>全选</span>
				 <a href="">合并支付</a>
				</div>-->
				<div class="cate">
					<li ><span class='shangping'>商品</span></li>
					<li><span style="padding-right: 39px;">单价/元</span></li> 	 	
					<li><span style="padding: 0px 23px;">数量</span></li>
					<li><span>实付款/元</span></li>
					<li><span style='padding-right:none;border:none'>订单状态及操作</span></li>
				</div>
				<!--*********-->
				<div class="tab_div">
				<!--要循环的数据-->
				{{foreach from="$ordersData" key="$order_k"  value="$order_v"}}
				<div class="shop">
					<div class="list-group-item">
					<div class="o-info">
							<div class="col-info">
								<span class="o-date">{{date('Y-m-d H:i:s',$order_v['time'])}}</span>
								<span class="o-no">订单号：<a href="/member/order-1730044053" title="1730044053">{{$order_v['number']}}</a></span>
							</div>
							<div class="col-state">
								{{$order_v['status']}}
							</div>
					</div>
					{{foreach from="$order_v['lists']" key="$lists_k" value="$lists_v"}}
					<div class="o-pro">
						<table border="0" cellpadding="0" cellspacing="0">
		        			<tbody>
	                        			<tr>
				        					<td class="col-pro-img">
				    							<p class="p-img">
				    								<a href="{{U('Content/index',array('gid'=>$lists_v['gid']))}}" target="_blank">
			                                    		<img alt="" src="{{__ROOT__}}/{{$lists_v['lists_pic']}}" width="100px" height="100px">
			                                    	</a>
				    							</p>
				        					</td>
				        					<td class="col-pro-info">
												<p class="p-name">
													<a href="{{U('Content/index',array('gid'=>$lists_v['gid']))}}">{{$lists_v['goods_name']}}</a>
												</p>
				        					</td>
				        					<td class="col-price"><em>¥</em><span>{{$lists_v['unit_price']}}.00</span>
				        					</td>
				        					<td class="col-quty">{{$lists_v['buy_num']}}</td>
				        					{{if value="$lists_k eq 0"}}
				        							<td rowspan="6" class="col-pay">
				        								<p><em>¥</em><span>
							        								{{$order_v['totalprice']}}.00
								        				</span>
								        				</p>
				        							</td>>
				        								<td rowspan="6" class="col-operate">
				        												<?php if($order_v['status'] == '未支付'){?>
																		<p class="p-button"> 
																			<a class="button-operate-pay" href="{{U('Order/successOrder',array('oid'=>$order_v['oid']))}}">
																		<span>立即支付</span>
																		</a>
																		</p>
																		{{if value="$order_v['status'] eq '未支付'"}}
				        											<p class="p-link"><a href="javascript:;" class="cancel">取消订单</a></p>
				        												{{endif}}
				        												<?php }else if($order_v['status'] == '已付款'){ ?>
				        												<p class="p-button"> 
																			<a class="button-operate-pay" href="javascript:;" class="tan">
																		<span>提醒发货</span>
																		</a>
																		</p>
																		<?php }else if($order_v['status'] == '已发货'){ ?>
				        													<p class="p-button"> 
																			<a class="button-operate-pay" href="{{U('User/complete',array('oid'=>$order_v['oid']))}}">
																				<span>确认收货</span>
																			</a>
																		</p>
																		<?php } ?>
				        											<!--确认删除   开始-->
				        											<div style="top: -50px; left: -160px; position: absolute; display: none;" id="ec_ui_confirm" class="popup-area popup-define-area hide">
																	    <div class="b">
																	        <p id="ec_ui_confirm_msg">您确认要取消该订单吗？</p>
																	        <div class="popup-button-area">
																	        	<a id="ec_ui_confirm_yes" href="{{U('User/delOrders',array('oid'=>$order_v['oid']))}}" class="button-action-yes" title="是">
																	        		<span>是</span></a>
																	        	<a id="ec_ui_confirm_no" href="javascript:;" class="button-action-no" title="否"><span>否</span></a>
																	        </div>
																	    </div>
																	    <div class="f"><s class="icon-arrow-down"></s></div>
																	</div>
																	<!--确认删除结束-->
				        									<p class="p-link"><a href="{{U('User/OrderDetail',array('oid'=>$order_v['oid']))}}">订单详情</a></p>
				        								</td>
				        					{{else}}
				        					<td style="width: 114px;"></td>
				        					<td style="width: 138px;"></td>
				        					{{endif}}
				        				</tr>
	                        	<!-- 普通商品列表 end -->
		        			</tbody>
		        		</table>
					</div>
					{{endforeach}}
				</div>
				</div>
				{{endforeach}}	
				</div>
				<!--****-->
				<script type="text/javascript">
					$(function(){
						$('.col-operate').on('click','.cancel',function(){
							$(this).parents('.o-pro').find('.popup-area').show();
						})
						$('.col-operate').on('click','.button-action-no',function(){
							$(this).parents('.o-pro').find('.popup-area').hide();
						})
						$('.o-pro').on('click','.tan',function(){
							alert(1);
						})
					})
				</script>
			</div>
		</div>
	<!--商城宣传-->
	<div class="slogan">
		<ul>
			<li style="width: 326px;"><i></i>500强企业 品质保证</li>
			<li style="width: 327px;"><i></i>7天退货 15天换货</li>
			<li><i></i>99元起免运费</li>
			<li style="float: right;"><i></i>448家维修网点 全国联保</li>
		</ul>
	</div>
<!--服务-->
	<!--底部友情链接-->
	<div class="footer">
		<div class="footer-otherLink">
		</div>
		<div class="footer-warrant-area">
			<p>Copyright © 2011-2015  华为软件技术有限公司  版权所有  保留一切权利  苏B2-20130048号 | 苏ICP备09062682号-9</p>
			<p><a href="">网络文化经营许可证苏网文[2012]0401-019号</a></p>
			<p class="footer-warrant-img">
				<a href=""><img src="{{__PUBLIC__}}/Home/images/certificate_01_112_40.png" alt="" /></a>
				<a href=""><img src="{{__PUBLIC__}}/Home/images/certificate_02_112_40.png" alt="" /></a>
				<a href=""><img src="{{__PUBLIC__}}/Home/images/certificate_03_112_40.png" alt="" /></a>
			</p>
		</div>
	</div>		
	</body>
</html>
